<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>示例1</title>
    <style>

        .box {
            border: 1px solid red;
            width: 400px;
            height: 300px;
            display: flex;
        }
        .box div{
            width: 100px;
            height: 100%;
            border: 1px solid blue;

            flex-grow: 1;
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="box1">等分效果1</div>
        <div class="box2">等分效果2</div>
    </div>
</body>

</html>